﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PurchaseOrderShow.aspx.cs" Inherits="weba.Sales.PurchaseOrderShow" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="30" background="../Images/tab_05.gif">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="12" height="30">
                                <img src="../Images/tab_03.gif" width="12" height="30" />
                            </td>
                            <td>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="46%" valign="middle">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="16" height="16" /></div>
                                                    </td>
                                                    <td width="95%">
                                                        <span class="titleBold12px">查看订货单详情</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td width="54%" align="right">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="16" height="30">
                                <img src="../Images/tab_07.gif" width="16" height="30" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="8" background="../images/tab_12.gif">
                                &nbsp;
                            </td>
                            <td>
                                <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td colspan="2" align="center">
                                            <asp:Label ID="lblSalesOrderID" runat="server" Visible="False"></asp:Label>
                                            <asp:Label ID="lblRootDepartmentID" runat="server" Visible="False"></asp:Label>
                                            <br />
                                            <asp:DataList ID="myDataList" runat="server" DataKeyField="PurchaseOrderID" 
                                                Width="100%" onitemdatabound="myDataList_ItemDataBound">
                                                <ItemTemplate>
                                                    订货单编号：<asp:Label ID="lblOrderNumber" runat="server"></asp:Label>
                                                    &nbsp;厂家：<asp:Label ID="lblManufacturerName" runat="server"></asp:Label>
                                                    &nbsp;经办人：<asp:Label ID="lblManager" runat="server"></asp:Label>
                                                    <br />
                                                    &nbsp;订货日期：<asp:Label ID="lblDateOrder" runat="server"></asp:Label>
                                                    &nbsp;付款日期：<asp:Label ID="lblDatePayment" runat="server"></asp:Label>
                                                    
                                                    &nbsp;合计金额：<asp:Label ID="lblSubTotal" runat="server"></asp:Label>
                                                    <br />
                                                    <asp:GridView ID="myGridViewPurchaseOrderDetail" runat="server" 
                                                        AutoGenerateColumns="False" DataKeyNames="DetailID,StatusArrival" 
                                                        Width="100%" onrowdatabound="myGridViewPurchaseOrderDetail_RowDataBound" >
                                                        <Columns>
                                                        <asp:BoundField DataField="DetailID" HeaderText="ID" ReadOnly="True"></asp:BoundField>
                                                            <asp:BoundField DataField="Name" HeaderText="名称" ReadOnly="True" />
                                                            <asp:TemplateField HeaderText="单价">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCostUnitPrice" runat="server" ></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="Quantity" HeaderText="数量" ReadOnly="True" />
                                                            <asp:TemplateField HeaderText="仓库">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblLocation" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="Subtotal" DataFormatString="{0:c}" HeaderText="小计" 
                                                                ReadOnly="True" />
                                                                <asp:TemplateField HeaderText="到货状态">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblStatusArrival" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                    </asp:GridView>
                                                    <br />
                                                </ItemTemplate>
                                            </asp:DataList>
                                            
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" align="center">
                                            <br />
                                            <asp:Button ID="btnClose" runat="server" Font-Size="16px" Height="30px" 
                                                            Text="关闭" Width="100px" OnClientClick="window.close();" />
                                            <br />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="8" background="../images/tab_15.gif">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td height="35" background="../images/tab_19.gif">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="12" height="35">
                                <img src="../images/tab_18.gif" width="12" height="35" />
                            </td>
                            <td align="center">
                                &nbsp;
                            </td>
                            <td width="16">
                                <img src="../images/tab_20.gif" width="16" height="35" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
